package com.eduhzy.ttw.teacher.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.mcxtzhang.indexlib.IndexBar.bean.BaseIndexPinyinBean;

/**
 * @author xubo
 * @date 2018/7/19 10:32
 */
public class ChooseSchoolData extends BaseIndexPinyinBean implements Parcelable {

    /**
     * areaCode :
     * addressAreaName : 湖南省长沙市开福区
     * parentName : 湖南省教育厅>长沙市教育局>开福区教育局>
     * areaName :
     * addressAreaCode : 430105
     * name : 湖南长师附小
     * id : 166319
     * parentId : 4017
     * groupFlag : 2
     */

    private String areaCode;
    private String addressAreaName;
    private String parentName;
    private String areaName;
    private int addressAreaCode;
    private String name;
    private String id;
    private String parentId;
    private int groupFlag;

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAddressAreaName() {
        return addressAreaName;
    }

    public void setAddressAreaName(String addressAreaName) {
        this.addressAreaName = addressAreaName;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getAddressAreaCode() {
        return addressAreaCode;
    }

    public void setAddressAreaCode(int addressAreaCode) {
        this.addressAreaCode = addressAreaCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public int getGroupFlag() {
        return groupFlag;
    }

    public void setGroupFlag(int groupFlag) {
        this.groupFlag = groupFlag;
    }

    @Override
    public String getTarget() {
        return name;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.areaCode);
        dest.writeString(this.addressAreaName);
        dest.writeString(this.parentName);
        dest.writeString(this.areaName);
        dest.writeInt(this.addressAreaCode);
        dest.writeString(this.name);
        dest.writeString(this.id);
        dest.writeString(this.parentId);
        dest.writeInt(this.groupFlag);
    }

    public ChooseSchoolData() {
    }

    protected ChooseSchoolData(Parcel in) {
        this.areaCode = in.readString();
        this.addressAreaName = in.readString();
        this.parentName = in.readString();
        this.areaName = in.readString();
        this.addressAreaCode = in.readInt();
        this.name = in.readString();
        this.id = in.readString();
        this.parentId = in.readString();
        this.groupFlag = in.readInt();
    }

    public static final Parcelable.Creator<ChooseSchoolData> CREATOR = new Parcelable.Creator<ChooseSchoolData>() {
        @Override
        public ChooseSchoolData createFromParcel(Parcel source) {
            return new ChooseSchoolData(source);
        }

        @Override
        public ChooseSchoolData[] newArray(int size) {
            return new ChooseSchoolData[size];
        }
    };
}
